<?php if (count($model) > 0) { ?>
    <div class="vj_top_raovat">
        <div class="vj_title_rv">
            <b><?php echo $position == Yii::app()->params['top-shopping'] ? 'Top Shopping' : "Top Rao Vặt" ?></b>

            <div>
                <label class="bt_rv_right" id="next_list02" onclick="return false;"></label>
                <label class="bt_rv_left" id="prev_list02" onclick="return false;"></label>

                <p><a href="<?php echo TreTodayUrl::getAppUrl('shopping') ?>">Shopping</a><span>|</span><a
                        href="<?php echo TreTodayUrl::getAppUrl('computer') ?>">Computer</a><span>|</span><a
                        href="<?php echo TreTodayUrl::getAppUrl('dientu') ?>">Điện tử</a></p>
            </div>
        </div>
        <div class="vj_content_rv" id="rv_list_02">
            <?php
            foreach ($model as $key => $item) {
                ?>
                <div>
                    <ul>
                        <?php foreach ($item as $i) { ?>
                            <li>
                                <div>
                                    <a href="<?php echo TreTodayUrl::getCategoryUrl($i['id'], $i['name']) ?>">
                                        <img width="181" height="121"
                                             style="background:url('<?php echo TreTodayUrl::home() . '/' . $i['picture'] ?>') no-repeat center center"
                                             alt="danh mục nổi bật"
                                             src="<?php echo TreTodayUrl::home() . '/images/graphics/blank.gif' ?>"/>
                                        <?php echo $i['name'] ?> </a>
                                    <label><a
                                            href="<?php echo TreTodayUrl::getCategoryUrl($i['id'], $i['name']) ?>"><?php echo $i['name'] ?></a>
                                    </label>

                                </div>
                                <p></p>
                    <span>
                        <?php foreach ($i['subs'] as $sub) { ?>
                            <a href="<?php echo TreTodayUrl::getCategoryUrl($sub->cat_id, $sub->cat_name) ?>"><?php echo $sub->cat_name ?>
                                »</a>
                        <?php } ?>
                    </span>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            <?php } ?>

        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#rv_list_02').cycle({
                fx: 'fade',
                speed: '50',
                timeout: 0,
                next: '#next_list02',
                prev: '#prev_list02'
            });
        });
    </script>
<?php } ?>